package com.scy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.scy.dto.BookDto;
import com.scy.entity.Book;
import org.apache.ibatis.annotations.Select;

public interface BookMapper extends BaseMapper<Book> {

    @Select("select b.book_name,t.type_name from book b left join book_type t on b.book_type=t.type_id where b.book_id = #{bookId}")
    public BookDto getBookInfoById(Long bookId);
}
